package a_java_48_day.day2;
/**
 * 倒置字符串
 */

import java.util.*;
import java.lang.*;
public class Main2 {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] splitStr = str.split(" ");
        for (String s : splitStr) {
            s = traver(s);
            sb = sb.append(s + ' ');
        }
        String ans = sb.toString();
        ans = traver(ans);
        ans = ans.trim();
        System.out.println(ans);
    }

    public static String traver(String str) {
        char[] array = str.toCharArray();
        int len = array.length;
        for (int i = 0; i < len / 2; i++) {
            char tmp = array[i];
            array[i] = array[len - i - 1];
            array[len - i - 1] = tmp;
        }
        String strAfter = new String(array);
        return strAfter;
    }
}